package com.xiu.travel.file.oss.service;

import com.xiu.travel.file.oss.domain.OssCallbackResult;
import com.xiu.travel.file.oss.domain.OssPolicyResult;
import com.xiu.travel.util.api.CommonResult;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * @author lijie
 * @date 2023/5/12 11:51
 * @description OssService
 *
 * oss上传管理Service
 */
public interface OssService
{
    /**
     * oss上传策略生成
     */
    OssPolicyResult policy();

    /**
     * oss上传成功回调
     */
    OssCallbackResult callback(HttpServletRequest request);
    CommonResult<String> upFile(MultipartFile file) throws IOException;
    String upFilePic(MultipartFile file) throws IOException;


    void removeFile(String file) throws IOException;


}
